package com.sgzn.sgpay.model.request;

import com.sgzn.sgpay.model.request.able.SgsReqAble;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * 更新用户积分服务请求类
 * @author huangsenguang
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
public class SgsUpdateCreditRequest extends SgsBaseRequest implements SgsReqAble{

    @NotBlank(message = "userId不允许为空")
    private String userId;

    @NotBlank(message = "更新积分credit不允许为空")
    private String credit;

    /**
     * 0：增加
     * 1：减少
     */
    @NotBlank(message = "更新积分的tradeMark不允许为空")
    @Pattern(regexp = "0|1",message = "tradeMark不存在")
    private String tradeMark;

}
